package edu.friday.controller;

import edu.friday.common.base.BaseController;
import edu.friday.common.result.RestResult;
import edu.friday.common.result.TableDataInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

@RestController
@RequestMapping("/demo")
public class DemoController extends BaseController {
    @PostMapping
    public RestResult add(){
        boolean flag = true;
        return toAjax(flag?1:0);
    }

    @GetMapping("/list")
    public TableDataInfo list(){
        return TableDataInfo.success(new ArrayList<>(),100);
    }
}
